package com.lagou.niancheng.lagou.service.common;

import lombok.Data;

import java.io.Serializable;

/**
 * com.lagou.niancheng.lagouserviceuser.common.Result
 *
 * @author wlz
 * @date 2020/6/28
 */
@Data
public class Result<T> implements Serializable {
    private boolean success;
    private String errorMsg;
    private String errorCode;
    private T data;


    public void check() {
        if (!success) {
            throw new LagouException(errorCode, errorMsg);
        }
    }
}
